<!--
@author pan
@createDate 2022/02 2022/2/28 14:28
-->
<script setup lang="ts" name="JsonFormInput">
import { JsonFormItemType } from 'components/json-form/JsonForm.type'
import {
  extractElFormItemCompProp,
  extractElFormItemCompEvent,
} from './JsonFormUtil'

const props = defineProps<{
  item: JsonFormItemType
  formData: any
}>()
</script>

<template>
  <el-input
    v-model="formData[item.fieldProp]"
    v-bind="extractElFormItemCompProp(props.item)"
    v-on="extractElFormItemCompEvent(props.item)"
  ></el-input>
</template>

<style lang="scss" scoped></style>
